package com.youyunsoft.commons.rx.Interceptor;

import java.io.IOException;

import okhttp3.Interceptor;
import okhttp3.Request;
import okhttp3.Response;

/**
 * Created by actlistener on 2018/4/9.
 */

public class HeaderInterceptor implements Interceptor {
    @Override
    public Response intercept(Chain chain) throws IOException {
        Request request = chain.request();

        Request.Builder builder = request.newBuilder();

//        builder.addHeader("applicationId", BuildConfig.APPLICATION_ID)
//                .addHeader("version", BuildConfig.VERSION_NAME)
//                .addHeader("PrivateTenantCode", SPUtils.get("user_input_tenementId", "").toString());


        request = builder.build();
        return chain.proceed(request);

    }


}
